---
title: "Class SingletonFactory&lt;T> | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common.Singleton/SingletonFactory`T`/"
---

# Class SingletonFactory<T>

> **Inheritance:** `System.Object` -> SingletonFactory&lt;T&gt;

# Class SingletonFactory&lt;T&gt;

###### **Namespace**: [Aurigma.DesignAtoms.Common.Singleton](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common.Singleton.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public class SingletonFactory<T>
    where T : class
```

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Constructors

### SingletonFactory

```csharp
public SingletonFactory(Func<T> factoryMethod)
```

## Methods

### GetInstance

```csharp
public T GetInstance()
```

##### Returns

`<T>`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |
